package com.dkd.http.controller;

import com.dkd.entity.vo.NodeItemVo;
import com.dkd.entity.vo.NodeVo;
import com.dkd.service.NodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 点位管理
 */
@RestController
@RequestMapping("/node")
@RequiredArgsConstructor
@Api(tags = "点位管理")
public class NodeController {
    private final NodeService nodeService;

    @ApiOperation("合作商点位汇总统计")
    @GetMapping("/nodeCollect")
    public List<NodeVo> nodeCollect() {
        return nodeService.nodeCollect();
    }

    @GetMapping("/count")
    @ApiOperation("获取点位总数")
    public Integer count() {
        return nodeService.count();
    }
}
